import 'dart:convert';

import 'package:largefriends/entity/json/json_parse_utils.dart';

class LfWinkEntity {
  LfWinkEntity({
    this.descr,
    this.isCustomType,
    this.id,
  });

  factory LfWinkEntity.fromJson(Map<String, dynamic> jsonRes) => LfWinkEntity(
      descr: jsonRes.asString('descr'),
      id: jsonRes.asStrings(['id', 'value']),
      isCustomType: jsonRes.asInt('isCustomType'));

  String? descr;
  String? id;
  int? isCustomType;

  @override
  String toString() {
    return jsonEncode(this);
  }

  Map<String, dynamic> toJson() => <String, dynamic>{
        'id': id,
        'isCustomType': isCustomType,
        'descr': descr,
      };
}
